import lazyload from './utils/lazyload'

export type IRoute = {
  name: string
  //key唯一
  key: string
  children?: IRoute[]
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  component?: any
  redirect?: string
}

export const routes: IRoute[] = [
  {
    name: 'home',
    key: '/home',
    component: lazyload(() => import(`./pages/home`)),
  },
  {
    name: 'dashboard',
    key: '/',
    component: lazyload(() => import(`./pages/dashboard`)),
  },
]

export default routes
